package com.feihong.txgw.ui.activity.setting;

import android.content.Intent;
import android.os.Bundle;

import com.feihong.txgw.R;
import com.feihong.txgw.message.LoginMessage;
import com.feihong.txgw.ui.activity.base.BaseActivity;
import com.feihong.txgw.utils.UserLoginInfo;
import com.meiqia.meiqiasdk.imageloader.MQImage;
import com.meiqia.meiqiasdk.util.MQIntentBuilder;

import java.util.HashMap;

import txgw.feihong.com.txgwlibrary.imageloader.MQGlideImageLoader4;

/**
 * Created by Sabirjan on 2017/8/3.
 * TXGWApp.
 * 飞宏电子
 */

public class ServiceMessageActivity extends BaseActivity {

    @Override
    public void setTheme() {

    }

    @Override
    public int setLayoutID() {
        return R.layout.activity_servicemessage;
    }

    @Override
    public void initView(Bundle savedInstanceState) {

        setPageTitle("客服系统");
        setBackButtonFinish();
        HashMap<String, String> clientInfo = new HashMap<>();
        if (UserLoginInfo.isUserLogin()) {
            if (UserLoginInfo.getUserCityInfo() != null && UserLoginInfo.getUserCityInfo().getCityName() != null) {
                clientInfo.put("name", "Android_" + UserLoginInfo.getUserCityInfo());
            } else {
                clientInfo.put("name", "Android_" + UserLoginInfo.getUserId());
            }

            clientInfo.put("avatar", "https://s3.cn-north-1.amazonaws.com.cn/pics.meiqia.bucket/1dee88eabfbd7bd4");
            // clientInfo.put("gender", "男");
            clientInfo.put("tel", UserLoginInfo.getUserPhone());
            clientInfo.put("客户端", "Android_"+ android.os.Build.MODEL);
        }
        MQImage.setImageLoader(new MQGlideImageLoader4());
        Intent intent = new MQIntentBuilder(this)
                .setClientInfo(clientInfo)
                .build();
        startActivity(intent);
        finish();
    }

    @Override
    public void bindData() {

    }

    @Override
    public void onUserLogin(LoginMessage loginMessage) {

    }
}
